<?php

use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;

class User extends Eloquent implements UserInterface, RemindableInterface {

	use UserTrait, RemindableTrait;

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'users';

	/**
	 * The attributes excluded from the model's JSON form.
	 *
	 * @var array
	 */
	protected $hidden = array('password', 'remember_token');

    /**
     * find all user's posts
     *
     * @return void
     * @author Steve Francia <steve.francia@gmail.com>
     */
    public function posts()
    {
        return $this->hasMany('Posts');
    }
    public function phone()
    {
        return $this->hasOne('Phone');
    }

    public function categories()
    {
        return $this->belongsToMany('Category');
    }

}
